/*
 * Project:  any-parent
 * Module:   any-framework
 * File:     ErrorCode.java
 * Modifier: ozn
 * Modified: 2012-08-13 19:06
 *
 * Copyright (c) 2012 Sanyuan Ltd. All Rights Reserved.
 *
 * Copying of this document or code and giving it to others and the
 * use or communication of the contents thereof, are forbidden without
 * expressed authority. Offenders are liable to the payment of damages.
 * All rights reserved in the event of the grant of a invention patent or the
 * registration of a utility model, design or code.
 */
package com.hoperun.framework.ex;

/**
 * 
 * .
 * <p/>
 * 
 * @author <a href="mailto:1988fuyu@163.com">fuyu</a>
 * 
 * @version v1.0 2013-7-2
 */
public interface XHZErrorCode {

	/**
	 * 服务器内部错误
	 */
	static final int SERVER_ERROR = 1;

	/**
	 * {0}参数非法
	 */
	static final int ILLEGAL_PARAM = 2;

	/**
	 * 必须参数{0}不存在
	 */
	static final int MISS_PARAM = 3;

	/**
	 * 授权模块
	 */
	public interface OAUTH_ERROR {
		/** 错误代码:40001,获取access_token时AppSecret错误 */
		public static final int ILLEGAL_SECRET = 40001;

		/** 错误代码:40002,获取access_token无效 */
		public static final int ACCESS_TOKEN_INVALID = 40002;

		/** 错误代码:40003,不合法的凭证类型 */
		public static final int ILLEGAL_GRANT_TYPE = 40003;

		/** 错误代码:40004,不合法的AppID，请开发者检查AppID的正确性，避免异常字符，注意大小写 */
		public static final int ILLEGAL_APPID = 40004;

		/**
		 * 错误代码:40005,不合法的access_token，请开发者认真比对access_token的有效性（如是否过期），
		 * 或查看是否正在为恰当的公众号调用接口
		 */
		public static final int ILLEGAL_ACCESS_TOKEN = 40005;

		/** 错误代码:40006,不合法的oauth_code */
		public static final int ILLEGAL_OAUTH_CODE = 40006;

		/** 错误代码:40007,不合法的refresh_token */
		public static final int ILLEGAL_TRFRESH_TOKEN = 40007;

		/** 错误代码:40008,缺少access_token参数 */
		public static final int LACK_ACCESS_TOKEN = 40008;

		/** 错误代码:40009,缺少appid参数 */
		public static final int LACK_APPID = 40009;

		/** 错误代码:40010,缺少refresh_token参数 */
		public static final int LACK_REFRESH_TOKEN = 40010;

		/** 错误代码:40011,缺少secret参数 */
		public static final int LACK_SECRET = 40011;

		/** 错误代码:40012,缺少oauth_code */
		public static final int LACK_OAUTH_CODE = 40012;

		/**
		 * 错误代码:40013,access_token超时，请检查access_token的有效期，请参考基础支持-获取access_token中
		 * ，对access_token的详细机制说明
		 */
		public static final int TIMEOUT_ACCESS_TOKEN = 40013;

		/** 错误代码:40014,refresh_token超时 */
		public static final int TIMEOUT_REFRESH_TOKEN = 40014;

		/** 错误代码:40015,oauth_code超时 */
		public static final int TIMEOUT_OAUTH_CODE = 40015;

		/** 错误代码:40016,应用未通过审核 */
		public static final int AUDIT_APP_ERROR = 40016;

		/** 错误代码:40017,非法URI，与应用绑定的不一致 */
		public static final int ILLEGAL_APP_URI = 40017;

		/** 错误代码:40018,缺少redirect_uri */
		public static final int LACK_REDIRECT_URI = 40018;
		
		/** 错误代码:40019,缺少client_id */
		public static final int LACK_CLIENT_ID = 40019;
		
		/** 错误代码:40029,缺少response_type */
		public static final int LACK_RESPONSE_TYPE = 40020;
	}

}
